<%--
  Created by IntelliJ IDEA.
  User: bi
  Date: 2019/1/3
  Time: 8:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <title>Title</title>
    <link type="text/css" rel="stylesheet" href="/css/style.css" />
    <style type="text/css">
        .red{border-color:#FF0033;}
        .cler{border-color:#00FF00;}
        #div {display:inline; margin-left:8px; color:red}
    </style>
</head>


<body onload="getValue()">
<div class="menu">
    <%
        String payStatus="";
        if(request.getParameter("payStatus")!=null)
            payStatus=request.getParameter("payStatus");
    %>
    </head>
    <form method="post" action="<%=request.getContextPath() %>/ProviderServlet?action=fenye">
        商品名称：<input type="text" name="productName"  class="input-text" />&nbsp;&nbsp;&nbsp;&nbsp;
        是否付款：<select name="payStatus">
        <option value="">请选择</option>
        <option value="1" <%=(payStatus.equals("1")?"selected":"") %> >已付款</option>
        <option value="0" <%=(payStatus.equals("0")?"selected":"") %> >未付款</option>
    </select>&nbsp;&nbsp;&nbsp;&nbsp;
        <input type="submit" value="组合查询" class="button" />
    </form>
</div>
<div class="main">
    <div class="optitle clearfix">
        <em><input type="button" name="button" value="添加数据" class="input-button" onclick="location.href='ProviderServlet?action=show'" /></em>
        <div class="title">账单管理&gt;&gt;</div>
    </div>
    <form method="post" action="/ProviderServlet?action=add">
        <div class="content">
            <table class="box">
                <tr>
                    <td class="field">供应商编号：</td>
                    <td><input type="text" name="id" id="productName" value="" onfocus="updateRed('productName')" onblur="checkName()"/>&nbsp;<font color="red" id="msgName">*</font></td>
                </tr>
                <tr>
                    <td class="field">供应商名称：</td>
                    <td><input type="text" name="name" id="unit" value="" onfocus="updateRed('unit')" onblur="checkUnit()"/>&nbsp;<font color="red" id="msgUnit">*</font></td>
                    <td><input type="hidden" name="id" class="text" value=""/></td>
                </tr>
                <tr>
                    <td class="field">供应商描述：</td>
                    <td><input type="text" name="description" id="counts" value="" onfocus="updateRed('counts')" onblur="checkCounts()"/>&nbsp;<font color="red" id="msgCounts">*</font></td>
                </tr>
                <tr>
                    <td class="field">联系人：</td>
                    <td><input type="text" name="contact" id="billMoney" value="" onfocus="updateRed('billMoney')" onblur="checkMoney()"/>&nbsp;<font color="red" id="msgMonery">*</font></td>
                </tr>
                <tr>
                    <td class="field">电话：</td>
                    <td><input type="text" name="phone"value=""></td>
                </tr>
                <tr>
                    <td class="field">供应商地址：</td>
                    <td><textarea name="address"></textarea></td>
                </tr>

                <td class="field">供应商传真：</td>
                <td>
                    <input type="text" name="fax" value="">
                </td>

                </tr>
            </table>
        </div>
        <div class="buttons" align="center">
            <input type="submit" name="submit" value="提交" class="input-button"/>
        </div>
        <!--onclick="del(${provider.id})"-->
    </form>
</div>
</body>
<script type="text/javascript" src="<%=request.getContextPath() %>/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
    /* function updateRed(Obj){

            $("#"+Obj).addClass("red");
    }*/

    /*
    * 非空验证
    */


    function del(id){
        if(confirm("确认删除吗？")==true){
            alert(id);
            window.location="/BillServlet?action=del&id="+id;
        }
    }

</script>
</html>
